<template>
	<view class="my-store-info">
		
		
		<view class="list">
			<view class="li-item" v-for="(item,index) in equipList" :key="index">
				<view class="li-item-model">
					<view class="item-child">设备名称：{{item.deviceName}}</view>
				</view>
				<view class="li-item-model">
					<view class="item-child">设备编号：{{item.deviceNumber}}</view>
				</view>
				<view class="li-item-model">
					<view class="item-child">激活时间：{{item.activateTime}}</view>
				</view>
				<view class="li-item-model">
					<view class="item-child">支付金额：{{item.payPrice}}</view>
					
				</view>
				<view class="li-item-model">
					<view class="item-child">推荐人手机号：{{item.deviceActivateStatusName}}</view>
				</view>
			</view>

		</view>
		<!-- <u-loadmore :status="status" /> -->
	</view>
</template>

<script>
	const app = getApp();
	const globalData = app.globalData;
	const apiUrl = globalData.wxApi;
	const wxImg = globalData.wxImg;
	import {
		getStoreData,
		dealNum,
		httpPost,
		httpGet,
		bdMapToTxMap,
		txMapToBdMap,
	} from "@/utils/http.js";
	import mpMixin from "@/uni_modules/uview-ui/libs/mixin/mpMixin";
	const pic1 = require(`@/img/my/my1.png`);



	export default {
		data() {
			return {
				wxImg,
				apiUrl,
				dealNum,
				pic1,
				value: "",
				userInfo: {},
				indexList: [],
				navList: [{
					text: "喇叭"
				}, {
					text: "盒子机"
				}],
				cur: 0,
				params: {
					deviceActivateStatus: "",
					deviceBindStatus: "",
					deviceModel: "",
					deviceNumber: "",
					deviceType: ""
				},
				hornNum: 0,
				BoxNum: 0,
				equipTotalNum: 0,
				searchModel: {
					deviceType: 1, //1喇叭，2盒子机
					pageNo: 1,
					pageSize: 10
				},
				equipList: [],
				// status: "loadmore",
				pageTotal: 1,

			};
		},

		onShow() {

		},
		onUnload() {

		},
		onLoad(options) {
			
			this.getEquipList();
		},
		onPullDownRefresh() {
				// this.cur=0;
				// this.searchModel.deviceType=1;
				// this.equipList=[];
				// this.searchModel.pageNo=1;
				this.getEquipList();
			},
		onReachBottom() {
			// if (this.searchModel.pageNo < this.pageTotal) {
			// 	this.status = 'loading';
			// 	this.searchModel.pageNo++
			// 	this.getEquipList();
			// } else {
			// 	this.status = 'nomore'
			// }

		},
		methods: {
			getEquipList() {
				let that = this;
				httpGet("/api/iotmerchantsdevice/myDeviceList")
					.then((res) => {
						console.log(res)
						that.equipList=res.data;
						uni.stopPullDownRefresh();
						
					})
					.catch((e) => {});
			}
			
		},
	};
</script>

<style lang="scss">
	.my-store-info {
		background-color: #f5f6f6;
		padding-top: 20rpx;
		height: calc(100vh - 20rpx);
	}


	/deep/ .u-cell__title-text {
		font-size: 28rpx;
	}

	.head-plate {
		background: linear-gradient(to bottom, #329ffc, #fff);
		padding-top: 30rpx;
		padding-bottom: 30rpx;

		.head-plate-into {
			margin-left: 30rpx;
			margin-right: 30rpx;
			background-color: #fff;
			border-radius: 20rpx;
			padding: 30rpx;

			.option-btn-box {
				display: flex;
				flex-direction: row;
				justify-content: space-between;

				.btn-p {
					padding: 10rpx 20rpx;
					color: #fff;
					font-size: 24rpx;
					border-radius: 10rpx;
				}

				.btn-p:nth-child(1) {
					background-color: #fe6906;
				}

				.btn-p:nth-child(2) {
					background-color: #2adae9;
				}

				.btn-p:nth-child(3) {
					background-color: #20ae48;
				}
			}
		}

		.my-equip {
			.my-text {
				font-size: 32rpx;
				text-align: center;
			}

			.my-number {
				font-size: 70rpx;
				display: flex;
				flex-direction: row;
				justify-content: center;
				margin-top: 10rpx;
				margin-bottom: 10rpx;

				.tag {
					font-size: 32rpx;
					padding-top: 36rpx;
				}
			}
		}

		.equip-number {
			display: flex;
			flex-direction: row;
			justify-content: flex-start;
			font-size: 28rpx;
			border-top: 2rpx solid #eee;
			margin-top: 20rpx;
			padding-top: 20rpx;

			.equip-number-item {
				margin-right: 40rpx;
			}
		}
	}

	.nav-plate {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		padding-left: 30rpx;
		padding-right: 30rpx;

		.nav-plate-left {
			display: flex;
			flex-direction: row;
			justify-content: flex-start;

			.nav-item {
				padding-bottom: 6rpx;
				border-bottom: 4rpx solid #fff;
				margin-right: 20rpx;
			}

			.active {
				border-bottom: 4rpx solid #329ffc;
				color: #329ffc;
			}
		}

		.nav-plate-right {
			display: flex;
			flex-direction: row;
			justify-content: flex-start;

		}
	}

	.list {
		padding-left: 30rpx;
		padding-right: 30rpx;

		.li-item {
			padding: 20rpx;
			margin-bottom: 20rpx;
			border-bottom: 2rpx solid #eee;
            background-color: #fff;
			border-radius: 10rpx;
			.li-item-model {
				border-bottom: 2rpx solid #eee;
				padding-bottom: 20rpx;
				margin-bottom: 20rpx;
				
			}
			.li-item-model:nth-last-child(1){
				border-bottom: none;
				margin-bottom: 0;
				padding-bottom: 0;
			}
		}
	}
</style>